package lec10api2;

import java.util.HashMap;
import java.util.Map;

public class MapDemo {
    public static void main(String[] args) {
        Map<String, String> contacts = new HashMap<>();
        System.out.println(contacts);
        contacts.put("tom", "1233456");
        contacts.put("jerry", "9999");
        contacts.put("peter", "88888");
        System.out.println(contacts);
        System.out.println("Calling " + contacts.get("tom") + ".");
        contacts.put("tom", "888888888888");
        System.out.println(contacts);
        contacts.remove("tom");
        System.out.println(contacts);

        contacts.clear();
        System.out.println(contacts);

    }
}
